/*
 * Copyright (c) 2022.  Asiacom Technology Inc. All rights reserved
 */

package com.swanclouds.model.systems;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.ModelEntity;

/**
 * @author 张立强
 * @version jdk1.8.0
 */
public class ModifySystemReq implements ModelEntity {
	@JsonProperty("AssetTag")
	private String assetTag;

	@JsonProperty("PowerRestorePolicyTypes")
	private String powerRestorePolicyTypes;

	@JsonProperty("IndicatorLED")
	private String indicatorLED;

	@JsonProperty("HostName")
	private String hostName;

	@JsonProperty("Boot")
	private BootReq boot;

	@JsonProperty("Oem")
	private Oem oem;

	public String getAssetTag() {
		return assetTag;
	}

	public String getPowerRestorePolicyTypes() {
		return powerRestorePolicyTypes;
	}

	public String getIndicatorLED() {
		return indicatorLED;
	}

	public String getHostName() {
		return hostName;
	}

	public BootReq getBoot() {
		return boot;
	}

	public Oem getOem() {
		return oem;
	}

	public static ModifySystemReq builder() {
		return new ModifySystemReq();
	}

	public ModifySystemReq assetTag(String assetTag) {
		this.assetTag = assetTag;
		return this;
	}

	public ModifySystemReq powerRestorePolicyTypes(String powerRestorePolicyTypes) {
		this.powerRestorePolicyTypes = powerRestorePolicyTypes;
		return this;
	}

	public ModifySystemReq indicatorLED(String indicatorLED) {
		this.indicatorLED = indicatorLED;
		return this;
	}

	public ModifySystemReq hostName(String hostName) {
		this.hostName = hostName;
		return this;
	}

	public ModifySystemReq boot(BootReq boot) {
		this.boot = boot;
		return this;
	}

	public ModifySystemReq oem(Oem oem) {
		this.oem = oem;
		return this;
	}

	@Override
	public String toString() {
		ObjectMapper objectMapper = new ObjectMapper();
		try {
			return objectMapper.writeValueAsString(this);
		} catch (JsonProcessingException e) {
		}
		return "ModifySystemReq {" +
				"assetTag='" + assetTag + '\'' +
				", powerRestorePolicyTypes='" + powerRestorePolicyTypes + '\'' +
				", indicatorLED='" + indicatorLED + '\'' +
				", HostName='" + hostName + '\'' +
				", boot=" + boot +
				", oem=" + oem +
				'}';
	}

	@JsonRootName("Oem")
	public static class Oem implements ModelEntity {

		@JsonProperty("Public")
		private Public pub;

		public Public getPub() {
			return pub;
		}

		public static Oem builder() {
			return new Oem();
		}

		public Oem pub(Public pub) {
			this.pub = pub;
			return this;
		}

		@Override
		public String toString() {
			ObjectMapper objectMapper = new ObjectMapper();
			try {
				return objectMapper.writeValueAsString(this);
			} catch (JsonProcessingException e) {
			}
			return "Oem {" +
					"pub=" + pub +
					'}';
		}
	}

	@JsonRootName("Public")
	public static class Public implements ModelEntity {
		@JsonProperty("ConfigurationModel")
		private String configurationModel;

		public String getConfigurationModel() {
			return configurationModel;
		}

		public static Public builder() {
			return new Public();
		}

		public Public configurationModel(String configurationModel) {
			this.configurationModel = configurationModel;
			return this;
		}

		@Override
		public String toString() {
			ObjectMapper objectMapper = new ObjectMapper();
			try {
				return objectMapper.writeValueAsString(this);
			} catch (JsonProcessingException e) {
			}
			return "Public {" +
					"configurationModel='" + configurationModel + '\'' +
					'}';
		}
	}
}
